package cn.iocoder.yudao.module.reclaim.controller.app.checkres;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.reclaim.controller.admin.productcheckres.vo.ReclaimCheckResRespVO;
import cn.iocoder.yudao.module.reclaim.service.productcheckres.ReclaimCheckResService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Tag(name = "用户 App - 回收核验结果")
@RestController
@RequestMapping("/reclaim/check-res")
@Validated
public class AppReclaimCheckResController {

    @Resource
    private ReclaimCheckResService productCheckResService;

    @GetMapping("/get-by-orderNo")
    @Operation(summary = "获得回收核验结果")
    @Parameter(name = "orderItemId", description = "编号", required = true, example = "1024")
    public CommonResult<ReclaimCheckResRespVO> getProductCheckResByOrderItemId(@RequestParam("orderNo") String orderNo) {
        return success(productCheckResService.getProductCheckResByOrderNo(orderNo));
    }
}
